package com.ruoyi.quartz.service;

import java.util.List;
import java.util.Map;

import com.ruoyi.quartz.domain.JobInfoConfig;
import com.ruoyi.quartz.domain.JobLogDTO;

/**
 * Created by acer on 2019/3/4.
 */
public interface BaseJobService {
	void updateJobConfigById(Map<String,Object> updateMap);

	String checkInstanceConfig(Map<String, String> paramMap);

	List<JobInfoConfig> getJobConfig(Map<String, String> paramMap);

	Long lockJobConfig(String jobName);

	void updateJobLogByIdlogDTO(JobLogDTO logDTO);

	Long insertJobLog(JobLogDTO logDTO);

	String getCronTime(Map<String, String> params);

	int updateJobRunningStatus(Map<String, String> paramMap);
	
	/**
	 * 返回true表示依赖任务当天执行状态为成功
	 * @param jobName
	 * @return ture/false 
	 */
	boolean judgePreviousJobStatus(String jobName);

	/**
	 * 获取一条可执行的job
	 * @param updateMap job名称，机器名称
	 * @return 可执行的id
	 */
	Long getJobLimitOne(Map<String, Object> updateMap);

	List<JobInfoConfig> selectJobList(JobInfoConfig job);
}
